package com.wnm.service.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.wnm.dao.AddressDao;
import com.wnm.pojo.Address;
import com.wnm.service.AddressService;
import com.wnm.util.DBUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressDao addressDao;

    @Override
    public List<Address> showAddressByUserid(int userid) {
        return addressDao.getAddressesByUserid(userid);
    }

    @Override
    public void add(Address address) {
        addressDao.add(address);
    }

    @Override
    public void setDefault(int addressid) {
        addressDao.setDefault(addressid);
    }

}
